/* $Id: SingleClientPersonDAO.java 
 * Copyright (C) 2011, TRAKHEES
 *  
 * Revision History
 *
 * Date  			Author 		    	Remarks
 * ---------------------------------------------------------------------------------
 *
 */
package ae.pcfc.etks.online.common.dao;

import java.util.List;

import ae.pcfc.etks.online.common.domain.ClientPersonReq;
import ae.pcfc.etks.online.common.domain.TTscClientCategory;
import ae.pcfc.etks.online.common.domain.TTscClientPerson;
import ae.pcfc.etks.online.common.domain.TTscLicType;
import ae.pcfc.etks.online.common.vo.ClientNameVO;
import ae.pcfc.etks.online.common.vo.SearchCriteriaPersonVO;
import ae.pcfc.etks.online.common.vo.TrakheesIdAndPINVO;
import ae.pcfc.etks.online.common.vo.TrakheesIdVO;

public interface SingleClientPersonDAO {
	
	/**
	 * add
	 * Method to add client person request to the database
	 * @param clientPersonReq
	 * @return
	 * String
	 */
	public String add(ClientPersonReq clientPersonReq);
	
	/**
	 * findSCPersonByTrakheesId
	 * Method to find client person domain object by trakhees id
	 * @param trakheesId
	 * @return
	 * TTscClientPerson
	 */
	public TTscClientPerson findSCPersonByTrakheesId(String trakheesId);
	
	/**
	 * validateTrakheesIdAndPIN
	 * Method to validate whether the trakhees ID and pin combination is valid
	 * @param trakheesIdAndPINVO
	 * @return
	 * boolean
	 */
	public boolean validateTrakheesIdAndPIN(TrakheesIdAndPINVO trakheesIdAndPINVO);
	
	/**
	 * getPinCodeByTrakheesId
	 * Method to find the pin code associated with a trakhees id
	 * @param trakheesId
	 * @return
	 * String
	 */
	public String getPinCodeByTrakheesId(String trakheesId);
	
	/**
	 * findTrkheesIdAndPinByEmail
	 * Method to find the trakhees id associated with an email
	 * @param email
	 * @return
	 * TrakheesIdAndPINVO
	 */
	public TrakheesIdAndPINVO findTrkheesIdAndPinByEmail(String email);
	
	/**
	 * findSCTrakheesIdsByRoleId
	 * Method to find the list of trakhees id and pin combinations associated with a role
	 * @param roleId
	 * @return
	 * List<TrakheesIdVO>
	 */
	public List<TrakheesIdVO> findSCTrakheesIdsByRoleId(String roleId);
	
	/**
	 * validateClientName
	 * Method to validate the client name, is already registered with any client
	 * @param clientNameVO
	 * @return
	 * boolean
	 */
	public boolean validateClientName(ClientNameVO clientNameVO);
	
	/**
	 * getClientCategory
	 * Method to find the client category domain objects based on the client type
	 * @param clientType
	 * @return
	 * List<TTscClientCategory>
	 */
	public List<TTscClientCategory> getClientCategory(String clientType);
	
	/**
	 * getClientCategoryById
	 * Method to find the client category domain objects based on the categoryid
	 * @param categoryId
	 * @return
	 * TTscClientCategory
	 */
	public TTscClientCategory getClientCategoryById(String categoryId);
	
	/**
	 * getClientLicenseTypeByCode
	 * Method to find the license type domain object based on the license type code
	 * @param licenseTypeCode
	 * @return
	 * TTscLicType
	 */
	public TTscLicType getClientLicenseTypeByCode(String licenseTypeCode);
	
	/**
	 * searchPerson
	 * Method to search the person clients based on the searchCriteriaPersonVO which contains fields with values for filtering
	 * @param searchCriteriaPersonVO
	 * @return
	 * List<TTscClientPerson>
	 */
	public List<TTscClientPerson> searchPerson(SearchCriteriaPersonVO searchCriteriaPersonVO);

	public String updateClientPersonStatus(ClientPersonReq clientPersonReq, String strTrakheesId, String clientStatus);
}
